package lab02.Test21;

public class Test {
    public static int amount(String s, char c) {
        int cmt = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == c) {

                cmt++;
            }
        }
        return cmt;

    }

    public static void main(String[] args) {
        System.out.println(amount("ahskjdkdl",'h'));
    }
}